<template>
  <div>
    <div class="flex items-center gap-4">
      <img :src="rightIcon" class="w-6 h-5" />
      清管器运行
    </div>
    <div
      class="mt-4 w-[390px] h-[130px] bg-white rounded-lg shadow flex flex-col items-center gap-2 py-8 box-border"
    >
      <div class="flex items-center justify-center gap-4">
        <span>清管器速度滑移系数 </span>
        <el-input v-model="SLIP" class="!w-[160px]" />
      </div>
      <div>（清管器运行速度= （1- 滑移系数）×管道流速）</div>
    </div>
  </div>
</template>

<script setup>
import rightIcon from '@/assets/images/rightIcon.png'
// 响应式数据
const SLIP = ref('0.05')

const validateSettings = () => {
  if (!SLIP.value) {
    ElMessage.error('清管器速度滑移系数不能为空')
    return false
  }

  return true
}

const isFormValid = computed(() => {
  if (!SLIP.value) return false

  return true
})

const getParamsData = () => {
  return {
    SLIP: SLIP.value,
    isQGQYX: true
  }
}

// 暴露给父组件的方法和数据
defineExpose({
  validateSettings,
  isFormValid,
  getParamsData
})
</script>

<style scoped></style>
